<layout name="../../../resource/master" />
<section class="vbox">
    <section>
        <section class="hbox stretch">
            <!-- /.aside -->
            <section id="content">
                <section class="vbox">
                    <section class="scrollable padder">
                        <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
                            <li><a href="{:u('admin/index/index')}"><i class="fa fa-home"></i> 首页</a></li>
                            <li class="active">类型属性管理</li>
                        </ul>
                        <section class="panel panel-default">
                            <header class="panel-heading">
                                类型属性列表
                            </header>
                            <div class="row wrapper">
                                <div class="col-sm-4 m-b-xs">
                                    <a href="{:u('typeStore',['tid'=>$_GET['tid']])}" class="btn btn-default btn-sm">添加类型属性</a>
                                </div>
                            </div>
                            <div class="table-responsive">
                                <table class="table table-striped b-t b-light">
                                    <thead>
                                    <tr>
                                        <td>属性ID</td>
                                        <td>属性名称</td>
                                        <td>属性类别</td>
                                        <td>属性值</td>
                                        <td>操作</td>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <volist name="field" id="vo">
                                    <tr>
                                        <td>{$vo['taid']}</td>
                                        <td>{$vo['tname']}</td>

                                        <td><if condition="$vo['ttype']==1 ">属性
                                            <else /> 规格
                                        </if></td>


                                        <td>{$vo['tvalue']}</td>
                                        <td>
                                            <div class="btn-group ">

                                                <a href="{:u('edit',['tid'=>$_GET['tid'],'taid'=>$vo['taid']])}" class="btn btn-success btn-xs">编辑</a>
                                                <a href="javascript:;" onclick="del({$vo['taid']},{$vo['tid']})" class="btn btn-danger btn-xs">删除</a>
                                            </div>
                                        </td>
                                    </tr>
                                    </volist>
                                    </tbody>
                                </table>
                            </div>
                            <div class="pagination pagination-sm pull-right">
                                <li class='disabled'  style="font-size: 20px;">{$show}</li>
                            </div>
                        </section>
                    </section>
                </section>
            </section>
        </section>
    </section>
</section>

<script>
    function del(taid,tid) {
//    alert(1);

        util.confirm('确定删除吗?',function(){
            location.href = "{:u('admin/TypeAttri/del')}"+'?taid='+taid+"&tid="+tid;
        })
    }
</script>



